! function(t) {
	"use strict";

	function o(t) {
		return {
			set: function(e, i) {
				t.setItem(e, n.serialize(i))
			},
			get: function(e) {
				return n.deserialize(t.getItem(e))
			},
			remove: function(e) {
				t.removeItem(e)
			},
			clear: function() {
				t.clear()
			}
		}
	}
	var e = t.document,
		i = {};
	$(t).on("load", function() {
		"function" == typeof FastClick && FastClick.attach(e.body)
	});
	var n = i.util = {
		parseOptions: function(t) {
			if($.isPlainObject(t)) return t;
			var e = t ? t.indexOf("{") : -1,
				i = {};
			if(e != -1) try {
				i = new Function("", "var json = " + t.substr(e) + "; return JSON.parse(JSON.stringify(json));")()
			} catch(t) {}
			return i
		},
		pageScroll: function() {
			var t = function(t) {
					t.preventDefault(), t.stopPropagation()
				},
				i = !1;
			return {
				lock: function() {
					i || (i = !0, e.addEventListener("touchmove", t))
				},
				unlock: function() {
					i = !1, e.removeEventListener("touchmove", t)
				}
			}
		}(),
		localStorage: function() {
			return o(t.localStorage)
		}(),
		sessionStorage: function() {
			return o(t.sessionStorage)
		}(),
		serialize: function(t) {
			return "string" == typeof t ? t : JSON.stringify(t)
		},
		deserialize: function(t) {
			if("string" == typeof t) try {
				return JSON.parse(t)
			} catch(e) {
				return t || void 0
			}
		}
	};
	$.fn.emulateTransitionEnd = function(t) {
		var e = !1,
			i = this;
		$(this).one("webkitTransitionEnd", function() {
			e = !0
		});
		var n = function() {
			e || $(i).trigger("webkitTransitionEnd")
		};
		setTimeout(n, t)
	}, "function" == typeof define ? define(i) : t.YDUI = i
}(window), ! function(t) {
	t.document.addEventListener("touchstart", function(t) {}, !1)
}(window), ! function(t, e) {
	"use strict";
	var i = e.dialog = e.dialog || {},
		n = $(t.document.body);
	i.confirm = function(t, i, o) {
		var a = "YDUI_CONFRIM";
		$("#" + a).remove();
		var r = arguments.length;
		if(r < 2) return void console.error("From YDUI's confirm: Please set two or three parameters!!!");
		if("function" != typeof arguments[1] && 2 == r && !arguments[1] instanceof Array) return void console.error("From YDUI's confirm: The second parameter must be a function or array!!!");
		2 == r && (o = i, i = t, t = "提示");
		var s = o;
		"function" == typeof o && (s = [{
			txt: "取消",
			color: !1
		}, {
			txt: "确定",
			color: !0,
			callback: function() {
				o && o()
			}
		}]);
		var c = $('<div class="mask-black-dialog" id="' + a + '">   <div class="m-confirm">       <div class="confirm-hd"><strong class="confirm-title">' + t + '</strong></div>       <div class="confirm-bd">' + i + "</div>   </div></div>"),
			l = $('<div class="confirm-ft"></div>');
		$.each(s, function(t, i) {
			var n;
			"boolean" == typeof i.color ? n = $('<a href="javascript:;" class="confirm-btn ' + (i.color ? "primary" : "default") + '">' + (i.txt || "") + "</a>") : "string" == typeof i.color && (n = $('<a href="javascript:;" style="color: ' + i.color + '">' + (i.txt || "") + "</a>")),
				function(t) {
					n.on("click", function(i) {
						i.stopPropagation(), s[t].stay || (e.util.pageScroll.unlock(), c.remove()), s[t].callback && s[t].callback()
					})
				}(t), l.append(n)
		}), c.find(".m-confirm").append(l), e.util.pageScroll.lock(), n.append(c)
	}, i.alert = function(t, i) {
		var o = "YDUI_ALERT";
		$("#" + o).remove();
		var a = $('<div id="' + o + '">   <div class="mask-black-dialog">       <div class="m-confirm m-alert">           <div class="confirm-bd">' + (t || "YDUI Touch") + '</div>           <div class="confirm-ft">               <a href="javascript:;" class="confirm-btn primary">确定</a>           </div>       </div>   </div></div>');
		e.util.pageScroll.lock(), n.append(a), a.find("a").on("click", function() {
			a.remove(), e.util.pageScroll.unlock(), "function" == typeof i && i()
		})
	}, i.toast = function() {
		var t = null;
		return function(i, o, a, r) {
			clearTimeout(t);
			var s = "YDUI_TOAST";
			$("#" + s).remove();
			var c = arguments.length;
			if(c < 2) return void console.error("From YDUI's toast: Please set two or more parameters!!!");
			var l = "";
			"success" != o && "error" != o || (l = '<div class="' + ("error" == o ? "toast-error-ico" : "toast-success-ico") + '"></div>');
			var u = $('<div class="mask-white-dialog" id="' + s + '">    <div class="m-toast ' + ("" == l ? "none-icon" : "") + '">' + l + '        <p class="toast-content">' + (i || "") + "</p>    </div></div>");
			e.util.pageScroll.lock(), n.append(u), "function" == typeof a && arguments.length >= 3 && (r = a, a = 2e3), t = setTimeout(function() {
				clearTimeout(t), e.util.pageScroll.unlock(), u.remove(), "function" == typeof r && r()
			}, (~~a || 2e3) + 100)
		}
	}(), i.notify = function() {
		var t = null;
		return function(e, i, o) {
			clearTimeout(t);
			var a = "YDUI_NOTIFY";
			$("#" + a).remove();
			var r = $('<div id="' + a + '"><div class="m-notify">' + (e || "") + "</div></div>");
			n.append(r);
			var s = function() {
					r.remove(), "function" == typeof o && o()
				},
				c = function() {
					clearTimeout(t), r.find(".m-notify").addClass("notify-out"), r.one("webkitTransitionEnd", s).emulateTransitionEnd(150)
				};
			r.on("click", c), ~~i > 0 && (t = setTimeout(c, i + 200))
		}
	}(), i.loading = function() {
		var t = "YDUI_LOADING";
		return {
			open: function(i) {
				$("#" + t).remove();
				var o = $('<div class="mask-white-dialog" id="' + t + '">   <div class="m-loading">       <div class="loading-icon"></div>       <div class="loading-txt">' + (i || "数据加载中") + "</div>   </div></div>").remove();
				e.util.pageScroll.lock(), n.append(o)
			},
			close: function() {
				e.util.pageScroll.unlock(), $("#" + t).remove()
			}
		}
	}()
}(window, YDUI), ! function(t) {
	"use strict";

	function a(t, e) {
		this.$element = $(t), this.closeElement = e, this.toggleClass = "actionsheet-toggle"
	}

	function r(t) {
		var e = Array.prototype.slice.call(arguments, 1);
		return this.each(function() {
			var i = $(this),
				n = i.data("ydui.actionsheet");
			n || (i.data("ydui.actionsheet", n = new a(this, t.closeElement)), t && "object" != typeof t || n.open()), "string" == typeof t && n[t] && n[t].apply(n, e)
		})
	}
	var e = t.document,
		i = $(e),
		n = $(e.body),
		o = $('<div class="mask-black"></div>');
	a.prototype.open = function() {
		YDUI.device.isIOS && $(".g-scrollview").addClass("g-fix-ios-overflow-scrolling-bug");
		var t = this;
		n.append(o), o.on("click.ydui.actionsheet.mask", function() {
			t.close()
		}), t.closeElement && i.on("click.ydui.actionsheet", t.closeElement, function() {
			t.close()
		}), t.$element.addClass(t.toggleClass).trigger("open.ydui.actionsheet")
	}, a.prototype.close = function() {
		var t = this;
		YDUI.device.isIOS && $(".g-scrollview").removeClass("g-fix-ios-overflow-scrolling-bug"), o.off("click.ydui.actionsheet.mask").remove(), t.$element.removeClass(t.toggleClass).trigger("close.ydui.actionsheet")
	}, i.on("click.ydui.actionsheet.data-api", "[data-ydui-actionsheet]", function(e) {
		e.preventDefault();
		var i = t.YDUI.util.parseOptions($(this).data("ydui-actionsheet")),
			n = $(i.target),
			o = n.data("ydui.actionsheet") ? "open" : i;
		r.call(n, o)
	}), $.fn.actionSheet = r
}(window),
function() {
	"use strict";

	function t(e, n) {
		function a(t, e) {
			return function() {
				return t.apply(e, arguments)
			}
		}
		var o;
		if(n = n || {}, this.trackingClick = !1, this.trackingClickStart = 0, this.targetElement = null, this.touchStartX = 0, this.touchStartY = 0, this.lastTouchIdentifier = 0, this.touchBoundary = n.touchBoundary || 10, this.layer = e, this.tapDelay = n.tapDelay || 200, this.tapTimeout = n.tapTimeout || 700, !t.notNeeded(e)) {
			for(var r = ["onMouse", "onClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel"], s = this, c = 0, l = r.length; c < l; c++) s[r[c]] = a(s[r[c]], s);
			i && (e.addEventListener("mouseover", this.onMouse, !0), e.addEventListener("mousedown", this.onMouse, !0), e.addEventListener("mouseup", this.onMouse, !0)), e.addEventListener("click", this.onClick, !0), e.addEventListener("touchstart", this.onTouchStart, !1), e.addEventListener("touchmove", this.onTouchMove, !1), e.addEventListener("touchend", this.onTouchEnd, !1), e.addEventListener("touchcancel", this.onTouchCancel, !1), Event.prototype.stopImmediatePropagation || (e.removeEventListener = function(t, i, n) {
				var o = Node.prototype.removeEventListener;
				"click" === t ? o.call(e, t, i.hijacked || i, n) : o.call(e, t, i, n)
			}, e.addEventListener = function(t, i, n) {
				var o = Node.prototype.addEventListener;
				"click" === t ? o.call(e, t, i.hijacked || (i.hijacked = function(t) {
					t.propagationStopped || i(t)
				}), n) : o.call(e, t, i, n)
			}), "function" == typeof e.onclick && (o = e.onclick, e.addEventListener("click", function(t) {
				o(t)
			}, !1), e.onclick = null)
		}
	}
	var e = navigator.userAgent.indexOf("Windows Phone") >= 0,
		i = navigator.userAgent.indexOf("Android") > 0 && !e,
		n = /iP(ad|hone|od)/.test(navigator.userAgent) && !e,
		o = n && /OS 4_\d(_\d)?/.test(navigator.userAgent),
		a = n && /OS [6-7]_\d/.test(navigator.userAgent),
		r = navigator.userAgent.indexOf("BB10") > 0;
	t.prototype.needsClick = function(t) {
		switch(t.nodeName.toLowerCase()) {
			case "button":
			case "select":
			case "textarea":
				if(t.disabled) return !0;
				break;
			case "input":
				if(n && "file" === t.type || t.disabled) return !0;
				break;
			case "label":
			case "iframe":
			case "video":
				return !0
		}
		return /\bneedsclick\b/.test(t.className)
	}, t.prototype.needsFocus = function(t) {
		switch(t.nodeName.toLowerCase()) {
			case "textarea":
				return !0;
			case "select":
				return !i;
			case "input":
				switch(t.type) {
					case "button":
					case "checkbox":
					case "file":
					case "image":
					case "radio":
					case "submit":
						return !1
				}
				return !t.disabled && !t.readOnly;
			default:
				return /\bneedsfocus\b/.test(t.className)
		}
	}, t.prototype.sendClick = function(t, e) {
		var i, n;
		document.activeElement && document.activeElement !== t && document.activeElement.blur(), n = e.changedTouches[0], i = document.createEvent("MouseEvents"), i.initMouseEvent(this.determineEventType(t), !0, !0, window, 1, n.screenX, n.screenY, n.clientX, n.clientY, !1, !1, !1, !1, 0, null), i.forwardedTouchEvent = !0, t.dispatchEvent(i)
	}, t.prototype.determineEventType = function(t) {
		return i && "select" === t.tagName.toLowerCase() ? "mousedown" : "click"
	}, t.prototype.focus = function(t) {
		var e;
		n && t.setSelectionRange && 0 !== t.type.indexOf("date") && "time" !== t.type && "month" !== t.type ? (e = t.value.length, t.setSelectionRange(e, e)) : t.focus()
	}, t.prototype.updateScrollParent = function(t) {
		var e, i;
		if(e = t.fastClickScrollParent, !e || !e.contains(t)) {
			i = t;
			do {
				if(i.scrollHeight > i.offsetHeight) {
					e = i, t.fastClickScrollParent = i;
					break
				}
				i = i.parentElement
			} while (i)
		}
		e && (e.fastClickLastScrollTop = e.scrollTop)
	}, t.prototype.getTargetElementFromEventTarget = function(t) {
		return t.nodeType === Node.TEXT_NODE ? t.parentNode : t
	}, t.prototype.onTouchStart = function(t) {
		var e, i, a;
		if(t.targetTouches.length > 1) return !0;
		if(e = this.getTargetElementFromEventTarget(t.target), i = t.targetTouches[0], n) {
			if(a = window.getSelection(), a.rangeCount && !a.isCollapsed) return !0;
			if(!o) {
				if(i.identifier && i.identifier === this.lastTouchIdentifier) return t.preventDefault(), !1;
				this.lastTouchIdentifier = i.identifier, this.updateScrollParent(e)
			}
		}
		return this.trackingClick = !0, this.trackingClickStart = t.timeStamp, this.targetElement = e, this.touchStartX = i.pageX, this.touchStartY = i.pageY, t.timeStamp - this.lastClickTime < this.tapDelay && t.preventDefault(), !0
	}, t.prototype.touchHasMoved = function(t) {
		var e = t.changedTouches[0],
			i = this.touchBoundary;
		return Math.abs(e.pageX - this.touchStartX) > i || Math.abs(e.pageY - this.touchStartY) > i
	}, t.prototype.onTouchMove = function(t) {
		return !this.trackingClick || ((this.targetElement !== this.getTargetElementFromEventTarget(t.target) || this.touchHasMoved(t)) && (this.trackingClick = !1, this.targetElement = null), !0)
	}, t.prototype.findControl = function(t) {
		return void 0 !== t.control ? t.control : t.htmlFor ? document.getElementById(t.htmlFor) : t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")
	}, t.prototype.onTouchEnd = function(t) {
		var e, r, s, c, l, u = this.targetElement;
		if(!this.trackingClick) return !0;
		if(t.timeStamp - this.lastClickTime < this.tapDelay) return this.cancelNextClick = !0, !0;
		if(t.timeStamp - this.trackingClickStart > this.tapTimeout) return !0;
		if(this.cancelNextClick = !1, this.lastClickTime = t.timeStamp, r = this.trackingClickStart, this.trackingClick = !1, this.trackingClickStart = 0, a && (l = t.changedTouches[0], u = document.elementFromPoint(l.pageX - window.pageXOffset, l.pageY - window.pageYOffset) || u, u.fastClickScrollParent = this.targetElement.fastClickScrollParent), s = u.tagName.toLowerCase(), "label" === s) {
			if(e = this.findControl(u)) {
				if(this.focus(u), i) return !1;
				u = e
			}
		} else if(this.needsFocus(u)) return t.timeStamp - r > 100 || n && window.top !== window && "input" === s ? (this.targetElement = null, !1) : (this.focus(u), this.sendClick(u, t), n && "select" === s || (this.targetElement = null, t.preventDefault()), !1);
		return !(!n || o || (c = u.fastClickScrollParent, !c || c.fastClickLastScrollTop === c.scrollTop)) || (this.needsClick(u) || (t.preventDefault(), this.sendClick(u, t)), !1)
	}, t.prototype.onTouchCancel = function() {
		this.trackingClick = !1, this.targetElement = null
	}, t.prototype.onMouse = function(t) {
		return !this.targetElement || (!!t.forwardedTouchEvent || (!t.cancelable || (!(!this.needsClick(this.targetElement) || this.cancelNextClick) || (t.stopImmediatePropagation ? t.stopImmediatePropagation() : t.propagationStopped = !0, t.stopPropagation(), t.preventDefault(), !1))))
	}, t.prototype.onClick = function(t) {
		var e;
		return this.trackingClick ? (this.targetElement = null, this.trackingClick = !1, !0) : "submit" === t.target.type && 0 === t.detail || (e = this.onMouse(t), e || (this.targetElement = null), e)
	}, t.prototype.destroy = function() {
		var t = this.layer;
		i && (t.removeEventListener("mouseover", this.onMouse, !0), t.removeEventListener("mousedown", this.onMouse, !0), t.removeEventListener("mouseup", this.onMouse, !0)), t.removeEventListener("click", this.onClick, !0), t.removeEventListener("touchstart", this.onTouchStart, !1), t.removeEventListener("touchmove", this.onTouchMove, !1), t.removeEventListener("touchend", this.onTouchEnd, !1), t.removeEventListener("touchcancel", this.onTouchCancel, !1)
	}, t.notNeeded = function(t) {
		var e, n, o, a;
		if("undefined" == typeof window.ontouchstart) return !0;
		if(n = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1]) {
			if(!i) return !0;
			if(e = document.querySelector("meta[name=viewport]")) {
				if(e.content.indexOf("user-scalable=no") !== -1) return !0;
				if(n > 31 && document.documentElement.scrollWidth <= window.outerWidth) return !0
			}
		}
		if(r && (o = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/), o[1] >= 10 && o[2] >= 3 && (e = document.querySelector("meta[name=viewport]")))) {
			if(e.content.indexOf("user-scalable=no") !== -1) return !0;
			if(document.documentElement.scrollWidth <= window.outerWidth) return !0
		}
		return "none" === t.style.msTouchAction || "manipulation" === t.style.touchAction || (a = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1], !!(a >= 27 && (e = document.querySelector("meta[name=viewport]"), e && (e.content.indexOf("user-scalable=no") !== -1 || document.documentElement.scrollWidth <= window.outerWidth))) || ("none" === t.style.touchAction || "manipulation" === t.style.touchAction))
	}, t.attach = function(e, i) {
		return new t(e, i)
	}, "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function() {
		return t
	}) : "undefined" != typeof module && module.exports ? (module.exports = t.attach, module.exports.FastClick = t) : window.FastClick = t
}();